package luafrontend.values;

import java.util.List;

import luafrontend.exceptions.ConversionException;

/**
 * Represents a Lua function.
 * TODO: Probably some factory object should produce these depending on whether interpretation or code generation
 * is to be done.
 * @author Petter Hansson
 *
 */
public abstract class LuaFunction extends LuaEnvValue {
	public LuaFunction asFunction() throws ConversionException {
		return this;
	}
	
	public abstract LuaReturnValue call(List<LuaValue> args);

	@Override
	public String toString() {
		return "function";
	}
}
